package com.psp.sp.persist.impl;

import org.springframework.stereotype.Repository;

import com.northend.util.MD5Util;
import com.psp.sp.model.UserBean;
import com.psp.sp.persist.dao.UserDao;

@Repository
public class UserImpl extends BaseImpl implements UserDao {
	final String NAME_SPACE = NAME_SPACE_HEADER + ".UserMapper";

	public int insert(UserBean user) {
		return 1;
	}

	public UserBean selectOneByPhone(String username) {
		UserBean user = new UserBean();
		user.setPhone("15762880191");
		user.setEmail("nostradamas@163.com");
		user.setPassword(MD5Util.sha256Hex("1234"));
		user.setState(Integer.valueOf(1));
		user.setUid("6f54a271fc2946f29874c7451f1062ab");
		return user;
	}

	public UserBean selectOneByEmail(String username) {
		UserBean user = new UserBean();
		user.setEmail("nostradamas@163.com");
		user.setPassword(MD5Util.sha256Hex("1234"));
		user.setState(Integer.valueOf(1));
		user.setUid("6f54a271fc2946f29874c7451f1062ab");
		return user;
	}

	public UserBean selectOne(String uid) {
		UserBean user = new UserBean();
		user.setEmail("nostradamas@163.com");
		user.setPassword(MD5Util.sha256Hex("1234"));
		user.setUid("6f54a271fc2946f29874c7451f1062ab");
		user.setState(Integer.valueOf(1));
		return user;
	}

	public int updateState(String userId, int i) {
		return 1;
	}

	public int updateLoginTime() {
		return 1;
	}

	@Override
	public int updatepwd(UserBean user) {
		return 1;
	}

	@Override
	public int updateUser(UserBean user) {
		return 1;
	}
}
